<?php if ($reviews) { ?>
<?php foreach ($reviews as $review) { ?>
<table class="table table-striped table-bordered">
  <tr>
    <td style="width: 50%;"><strong><?php echo $review['author']; ?></strong></td>
    <td class="text-right"><?php echo $review['date_added']; ?></td>
  </tr>
  <tr>
    <td colspan="2">
      <div>
        <?php foreach ($review['images'] as $image) { ?>
        <img src="<?php echo $image ?>" style="max-width:200px; max-height:200px;"/>
        <?php } ?>
      <div>
      <p><?php echo $review['text']; ?></p>
      <div class="rating">
        <?php for ($i = 1; $i <= 5; $i++) { ?>
        <?php if ($review['rating'] < $i) { ?>
        <span class="fa fa-stack"><i class="fa fa-star off fa-stack-1x"></i></span>
        <?php } else { ?>
        <span class="fa fa-stack"><i class="fa fa-star off fa-stack-1x"></i><i class="fa fa-star fa-stack-1x"></i></span>
        <?php } ?>
        <?php } ?>
      </div>
      </td>
  </tr>
</table>
<?php } ?>
<div class="text-right"><?php echo $pagination; ?></div>
<?php } else { ?>
<p><?php echo $text_no_reviews; ?></p>
<?php } ?>
